<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Coverage Report</title>
<link title="Style" type="text/css" rel="stylesheet" href="css/main.css"/>
<script type="text/javascript" src="js/popup.js"></script>
</head>
<body>
<h5>Coverage Report - org.azeckoski.reflectutils.ConstructorUtils</h5>
<div class="separator">&nbsp;</div>
<table class="report">
<thead><tr>  <td class="heading">Classes in this File</td>  <td class="heading" width="20%"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Line Coverage</a></td>  <td class="heading" width="20%"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Branch Coverage</a></td>  <td class="heading" width="10%"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Complexity</a></td></tr></thead>
  <tr><td class="text"><a href="org.azeckoski.reflectutils.ConstructorUtils.html">ConstructorUtils</a></td><td class="value"><table cellpadding="0" cellspacing="0" align="right"><tr><td>89%&nbsp;</td><td><table class="percentGraph" cellpadding="0" cellspacing="0" width="100"><tr><td class="covered" width="89"></td><td class="uncovered" width="10"></td></tr></table></td></tr></table></td><td class="value"><table cellpadding="0" cellspacing="0" align="right"><tr><td>96%&nbsp;</td><td><table class="percentGraph" cellpadding="0" cellspacing="0" width="100"><tr><td class="covered" width="96"></td><td class="uncovered" width="3"></td></tr></table></td></tr></table></td><td class="value"><span class="hidden">0.0;</span>0</td></tr>
</table>
<div class="separator">&nbsp;</div>
<table cellspacing="0" cellpadding="0" class="src">
<tr>
  <td class="numLine">&nbsp;1</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;2</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * $Id: org.azeckoski.reflectutils.ConstructorUtils.html 28 2008-10-02 16:17:03Z azeckoski $</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;3</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * $URL: http://reflectutils.googlecode.com/svn/maven/site/cobertura/org.azeckoski.reflectutils.ConstructorUtils.html $</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;4</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * FieldUtils.java - genericdao - May 19, 2008 10:10:15 PM - azeckoski</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;5</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> **************************************************************************</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;6</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * Copyright (c) 2008 Aaron Zeckoski</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;7</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * Licensed under the Apache License, Version 2.0</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;8</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;9</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * A copy of the Apache License has been included in this </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;10</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * distribution and is available at: http://www.apache.org/licenses/LICENSE-2.0.txt</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;11</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> *</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;12</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * Aaron Zeckoski (azeckoski @ gmail.com) (aaronz @ vt.edu) (aaron @ caret.cam.ac.uk)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;13</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;14</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;15</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">package</span> org.azeckoski.reflectutils;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;16</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;17</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.io.Serializable;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;18</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.lang.ref.SoftReference;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;19</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.lang.reflect.Array;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;20</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.lang.reflect.Constructor;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;21</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.lang.reflect.InvocationTargetException;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;22</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.math.BigDecimal;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;23</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.math.BigInteger;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;24</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.sql.Timestamp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;25</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.ArrayList;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;26</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.Arrays;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;27</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.Collection;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;28</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.Collections;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;29</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.Date;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;30</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.HashMap;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;31</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.HashSet;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;32</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.List;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;33</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.Map;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;34</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.Set;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;35</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.SortedMap;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;36</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.SortedSet;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;37</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.TreeMap;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;38</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.TreeSet;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;39</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.Vector;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;40</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;41</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> org.azeckoski.reflectutils.map.ArrayOrderedMap;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;42</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;43</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;44</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * Class which provides methods for dealing with class constructors,</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;45</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * also provides access to all the public constructors for a class</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;46</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;47</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> * @author Aaron Zeckoski (azeckoski @ gmail.com)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;48</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;49</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">public</span> <span class="keyword">class</span> ConstructorUtils {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;50</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;51</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;52</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Empty constructor</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;53</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;br/&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;54</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;b&gt;WARNING:&lt;/b&gt; use the {@link #getInstance()} method to get this rather than recreating it over and over</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;55</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;56</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> ConstructorUtils() {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;57</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;        ConstructorUtils.setInstance(<span class="keyword">this</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;58</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;59</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;60</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">protected</span> ClassDataCacher getClassDataCacher() {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;61</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> ClassDataCacher.getInstance();</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;62</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;63</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;64</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">// init all the maps when class inits</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;65</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">static</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;66</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;        makeImmutableDefaultsMap();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;67</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;        makePrimitiveDefaultsMap();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;68</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;        makePrimitiveWrapperMap();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;69</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;        makeWTPMap();</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;70</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;71</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;72</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/* </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;73</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Some code below derived from BeanCloner</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;74</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * http://www.coderslog.com/Main_Page</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;75</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Copyright 2007 CodersLog.com </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;76</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   Licensed under the Apache License, Version 2.0 (the "License");</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;77</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;78</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> Set&lt;Class&lt;?&gt;&gt; immutableTypes = <span class="keyword">null</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;79</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;80</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return a set of all known immutable types</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;81</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;82</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">synchronized</span> Set&lt;Class&lt;?&gt;&gt; getImmutableTypes() {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;83</td>
  <td class="nbHitsCovered">&nbsp;1556</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (immutableTypes == <span class="keyword">null</span> </pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;84</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                || immutableTypes.isEmpty()) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;85</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;            makeDefaultImmuatableSet();</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;86</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;87</td>
  <td class="nbHitsCovered">&nbsp;1556</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> immutableTypes;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;88</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;89</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> makeDefaultImmuatableSet() {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;90</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;        immutableTypes = getImmutableDefaults().keySet();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;91</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;92</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;93</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> Map&lt;Class&lt;?&gt;, Object&gt; immutableDefaults = <span class="keyword">null</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;94</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;95</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the map of all immutable types -&gt; the default values for those types</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;96</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;97</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">synchronized</span> Map&lt;Class&lt;?&gt;, Object&gt; getImmutableDefaults() {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;98</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (immutableDefaults == <span class="keyword">null</span> ||</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;99</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                immutableDefaults.isEmpty()) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;100</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;            makeImmutableDefaultsMap();</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;101</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;102</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> immutableDefaults;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;103</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;104</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> makeImmutableDefaultsMap() {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;105</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        immutableDefaults = <span class="keyword">new</span> HashMap&lt;Class&lt;?&gt;, Object&gt;();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;106</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        immutableDefaults.put(BigDecimal.<span class="keyword">class</span>, <span class="keyword">new</span> BigDecimal(0));</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;107</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        immutableDefaults.put(BigInteger.<span class="keyword">class</span>, BigInteger.valueOf(0l));</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;108</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        immutableDefaults.put(Boolean.<span class="keyword">class</span>, Boolean.FALSE);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;109</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        immutableDefaults.put(Byte.<span class="keyword">class</span>, Byte.valueOf((<span class="keyword">byte</span>)0));</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;110</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        immutableDefaults.put(Character.<span class="keyword">class</span>, (Character)c);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;111</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        immutableDefaults.put(Date.<span class="keyword">class</span>, <span class="keyword">new</span> Date(0));</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;112</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        immutableDefaults.put(Double.<span class="keyword">class</span>, Double.valueOf(0));</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;113</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        immutableDefaults.put(Float.<span class="keyword">class</span>, Float.valueOf(0));</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;114</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        immutableDefaults.put(Long.<span class="keyword">class</span>, Long.valueOf(0));</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;115</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        immutableDefaults.put(Integer.<span class="keyword">class</span>, Integer.valueOf(0));</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;116</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        immutableDefaults.put(String.<span class="keyword">class</span>, <span class="string">""</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;117</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        immutableDefaults.put(Short.<span class="keyword">class</span>, Short.valueOf((<span class="keyword">short</span>)0));</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;118</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        immutableDefaults.put(Timestamp.<span class="keyword">class</span>, <span class="keyword">new</span> Timestamp(0));</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;119</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;120</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;121</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> Map&lt;Class&lt;?&gt;, Class&lt;?&gt;&gt; primitiveToWrapper = <span class="keyword">null</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;122</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;123</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the map of all primitive types -&gt; wrapper types</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;124</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;125</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">synchronized</span> Map&lt;Class&lt;?&gt;, Class&lt;?&gt;&gt; getPrimitiveToWrapper() {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;126</td>
  <td class="nbHitsCovered">&nbsp;132</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (primitiveToWrapper == <span class="keyword">null</span> ||</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;127</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                primitiveToWrapper.isEmpty()) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;128</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;            makePrimitiveWrapperMap();</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;129</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;130</td>
  <td class="nbHitsCovered">&nbsp;132</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> primitiveToWrapper;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;131</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;132</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> makePrimitiveWrapperMap() {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;133</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveToWrapper = <span class="keyword">new</span> HashMap&lt;Class&lt;?&gt;, Class&lt;?&gt;&gt;();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;134</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveToWrapper.put(<span class="keyword">boolean</span>.<span class="keyword">class</span>, Boolean.<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;135</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveToWrapper.put(<span class="keyword">byte</span>.<span class="keyword">class</span>, Byte.<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;136</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveToWrapper.put(<span class="keyword">char</span>.<span class="keyword">class</span>, Character.<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;137</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveToWrapper.put(<span class="keyword">double</span>.<span class="keyword">class</span>, Double.<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;138</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveToWrapper.put(<span class="keyword">float</span>.<span class="keyword">class</span>, Float.<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;139</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveToWrapper.put(<span class="keyword">int</span>.<span class="keyword">class</span>, Integer.<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;140</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveToWrapper.put(<span class="keyword">long</span>.<span class="keyword">class</span>, Long.<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;141</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveToWrapper.put(<span class="keyword">short</span>.<span class="keyword">class</span>, Short.<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;142</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveToWrapper.put(<span class="keyword">boolean</span>[].<span class="keyword">class</span>, Boolean[].<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;143</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveToWrapper.put(<span class="keyword">byte</span>[].<span class="keyword">class</span>, Byte[].<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;144</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveToWrapper.put(<span class="keyword">char</span>[].<span class="keyword">class</span>, Character[].<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;145</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveToWrapper.put(<span class="keyword">double</span>[].<span class="keyword">class</span>, Double[].<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;146</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveToWrapper.put(<span class="keyword">float</span>[].<span class="keyword">class</span>, Float[].<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;147</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveToWrapper.put(<span class="keyword">int</span>[].<span class="keyword">class</span>, Integer[].<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;148</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveToWrapper.put(<span class="keyword">long</span>[].<span class="keyword">class</span>, Long[].<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;149</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveToWrapper.put(<span class="keyword">short</span>[].<span class="keyword">class</span>, Short[].<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;150</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;151</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;152</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> Map&lt;Class&lt;?&gt;, Class&lt;?&gt;&gt; wrapperToPrimitive = <span class="keyword">null</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;153</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;154</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the map of all wrapper types -&gt; primitive types</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;155</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;156</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">synchronized</span> Map&lt;Class&lt;?&gt;, Class&lt;?&gt;&gt; getWrapperToPrimitive() {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;157</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (wrapperToPrimitive == <span class="keyword">null</span> ||</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;158</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                wrapperToPrimitive.isEmpty()) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;159</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;            makeWTPMap();</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;160</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;161</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> wrapperToPrimitive;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;162</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;163</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> makeWTPMap() {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;164</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        wrapperToPrimitive = <span class="keyword">new</span> HashMap&lt;Class&lt;?&gt;, Class&lt;?&gt;&gt;();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;165</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        wrapperToPrimitive.put(Boolean.<span class="keyword">class</span>, <span class="keyword">boolean</span>.<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;166</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        wrapperToPrimitive.put(Byte.<span class="keyword">class</span>, <span class="keyword">byte</span>.<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;167</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        wrapperToPrimitive.put(Character.<span class="keyword">class</span>, <span class="keyword">char</span>.<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;168</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        wrapperToPrimitive.put(Double.<span class="keyword">class</span>, <span class="keyword">double</span>.<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;169</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        wrapperToPrimitive.put(Float.<span class="keyword">class</span>, <span class="keyword">float</span>.<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;170</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        wrapperToPrimitive.put(Integer.<span class="keyword">class</span>, <span class="keyword">int</span>.<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;171</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        wrapperToPrimitive.put(Long.<span class="keyword">class</span>, <span class="keyword">long</span>.<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;172</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        wrapperToPrimitive.put(Short.<span class="keyword">class</span>, <span class="keyword">short</span>.<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;173</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        wrapperToPrimitive.put(Boolean[].<span class="keyword">class</span>, <span class="keyword">boolean</span>[].<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;174</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        wrapperToPrimitive.put(Byte[].<span class="keyword">class</span>, <span class="keyword">byte</span>[].<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;175</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        wrapperToPrimitive.put(Character[].<span class="keyword">class</span>, <span class="keyword">char</span>[].<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;176</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        wrapperToPrimitive.put(Double[].<span class="keyword">class</span>, <span class="keyword">double</span>[].<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;177</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        wrapperToPrimitive.put(Float[].<span class="keyword">class</span>, <span class="keyword">float</span>[].<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;178</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        wrapperToPrimitive.put(Integer[].<span class="keyword">class</span>, <span class="keyword">int</span>[].<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;179</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        wrapperToPrimitive.put(Long[].<span class="keyword">class</span>, <span class="keyword">long</span>[].<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;180</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        wrapperToPrimitive.put(Short[].<span class="keyword">class</span>, <span class="keyword">short</span>[].<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;181</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;182</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;183</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> Map&lt;Class&lt;?&gt;, Object&gt; primitiveDefaults = <span class="keyword">null</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;184</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;185</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the map of all primitive types -&gt; the default values for those types</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;186</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;187</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">synchronized</span> Map&lt;Class&lt;?&gt;, Object&gt; getPrimitiveDefaults() {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;188</td>
  <td class="nbHitsCovered">&nbsp;9</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (primitiveDefaults == <span class="keyword">null</span> ||</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;189</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                primitiveDefaults.isEmpty()) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;190</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;            makePrimitiveDefaultsMap();</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;191</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;192</td>
  <td class="nbHitsCovered">&nbsp;9</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> primitiveDefaults;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;193</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;194</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">char</span> c;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;195</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> makePrimitiveDefaultsMap() {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;196</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveDefaults = <span class="keyword">new</span> HashMap&lt;Class&lt;?&gt;, Object&gt;();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;197</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveDefaults.put(<span class="keyword">boolean</span>.<span class="keyword">class</span>, (Boolean)<span class="keyword">false</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;198</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveDefaults.put(<span class="keyword">byte</span>.<span class="keyword">class</span>, (Byte)(<span class="keyword">byte</span>)0);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;199</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveDefaults.put(<span class="keyword">char</span>.<span class="keyword">class</span>, (Character)c);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;200</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveDefaults.put(<span class="keyword">double</span>.<span class="keyword">class</span>, (Double)0.0D);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;201</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveDefaults.put(<span class="keyword">float</span>.<span class="keyword">class</span>, (Float)0.0F);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;202</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveDefaults.put(<span class="keyword">int</span>.<span class="keyword">class</span>, (Integer)0);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;203</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveDefaults.put(<span class="keyword">long</span>.<span class="keyword">class</span>, (Long)0L);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;204</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;        primitiveDefaults.put(<span class="keyword">short</span>.<span class="keyword">class</span>, (Short)(<span class="keyword">short</span>)0);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;205</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;206</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;207</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> checkNull(Class&lt;?&gt; type) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;208</td>
  <td class="nbHitsCovered">&nbsp;8971</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (type == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;209</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"class type cannot be null to check the type"</span>);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;210</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;211</td>
  <td class="nbHitsCovered">&nbsp;8971</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;212</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;213</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;214</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Get the default value for for a type if one is available OR null if there is no default (since null sorta is the default)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;215</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param &lt;T&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;216</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param type any class type including primitives</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;217</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the default value OR null if there is no default</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;218</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;219</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    @SuppressWarnings(<span class="string">"unchecked"</span>)</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;220</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> &lt;T&gt; T getDefaultValue(Class&lt;T&gt; type) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;221</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        T val = <span class="keyword">null</span>;</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;222</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">if</span> (getPrimitiveDefaults().containsKey(type)) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;223</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            val = (T) getPrimitiveDefaults().get(type);</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;224</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        } <span class="keyword">else</span> <span class="keyword">if</span> (getImmutableDefaults().containsKey(type)) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;225</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            val = (T) getImmutableDefaults().get(type);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;226</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;227</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> val;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;228</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;229</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;230</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;231</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param type any class</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;232</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return true if this class is a primitive or other simple class (like String or immutable)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;233</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;234</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">boolean</span> isClassSimple(Class&lt;?&gt; type) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;235</td>
  <td class="nbHitsCovered">&nbsp;1542</td>
  <td class="src"><pre class="src">&nbsp;        checkNull(type);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;236</td>
  <td class="nbHitsCovered">&nbsp;1542</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">boolean</span> simple = <span class="keyword">false</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;237</td>
  <td class="nbHitsCovered">&nbsp;1542</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> ( isClassPrimitive(type) </pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;238</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                || getImmutableTypes().contains(type)) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;239</td>
  <td class="nbHitsCovered">&nbsp;1001</td>
  <td class="src"><pre class="src">&nbsp;            simple = <span class="keyword">true</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;240</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;241</td>
  <td class="nbHitsCovered">&nbsp;1542</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> simple;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;242</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;243</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;244</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;245</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param type any class</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;246</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return true if this class is a bean of some kind (i.e. not primitive, immutable, or a holder like a map)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;247</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;248</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">boolean</span> isClassBean(Class&lt;?&gt; type) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;249</td>
  <td class="nbHitsCovered">&nbsp;38</td>
  <td class="src"><pre class="src">&nbsp;        checkNull(type);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;250</td>
  <td class="nbHitsCovered">&nbsp;38</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">boolean</span> bean = <span class="keyword">true</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;251</td>
  <td class="nbHitsCovered">&nbsp;38</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> ( isClassSimple(type) || isClassObjectHolder(type) ) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;252</td>
  <td class="nbHitsCovered">&nbsp;30</td>
  <td class="src"><pre class="src">&nbsp;            bean = <span class="keyword">false</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;253</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;254</td>
  <td class="nbHitsCovered">&nbsp;38</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> bean;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;255</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;256</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;257</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;258</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param type any class</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;259</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return true if this class is an array (e.g. int[].class, {@link Integer}[] )</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;260</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;261</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">boolean</span> isClassArray(Class&lt;?&gt; type) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;262</td>
  <td class="nbHitsCovered">&nbsp;2584</td>
  <td class="src"><pre class="src">&nbsp;        checkNull(type);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;263</td>
  <td class="nbHitsCovered">&nbsp;2584</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">boolean</span> array = <span class="keyword">false</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;264</td>
  <td class="nbHitsCovered">&nbsp;2584</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (type.isArray()) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;265</td>
  <td class="nbHitsCovered">&nbsp;206</td>
  <td class="src"><pre class="src">&nbsp;            array = <span class="keyword">true</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;266</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;267</td>
  <td class="nbHitsCovered">&nbsp;2584</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> array;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;268</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;269</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;270</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;271</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param type any class</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;272</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return true if this class is a primitive (e.g. int.class, boolean.class)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;273</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;274</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">boolean</span> isClassPrimitive(Class&lt;?&gt; type) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;275</td>
  <td class="nbHitsCovered">&nbsp;3308</td>
  <td class="src"><pre class="src">&nbsp;        checkNull(type);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;276</td>
  <td class="nbHitsCovered">&nbsp;3308</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">boolean</span> primitive = <span class="keyword">false</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;277</td>
  <td class="nbHitsCovered">&nbsp;3308</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (type.isPrimitive()) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;278</td>
  <td class="nbHitsCovered">&nbsp;129</td>
  <td class="src"><pre class="src">&nbsp;            primitive = <span class="keyword">true</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;279</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;280</td>
  <td class="nbHitsCovered">&nbsp;3308</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> primitive;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;281</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;282</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;283</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;284</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param type any class</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;285</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return true if this class is a list (e.g. {@link List}, {@link ArrayList})</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;286</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;287</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">boolean</span> isClassList(Class&lt;?&gt; type) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;288</td>
  <td class="nbHitsCovered">&nbsp;75</td>
  <td class="src"><pre class="src">&nbsp;        checkNull(type);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;289</td>
  <td class="nbHitsCovered">&nbsp;75</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">boolean</span> list = <span class="keyword">false</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;290</td>
  <td class="nbHitsCovered">&nbsp;75</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (List.<span class="keyword">class</span>.isAssignableFrom(type)) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;291</td>
  <td class="nbHitsCovered">&nbsp;18</td>
  <td class="src"><pre class="src">&nbsp;            list = <span class="keyword">true</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;292</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;293</td>
  <td class="nbHitsCovered">&nbsp;75</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> list;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;294</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;295</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;296</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;297</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param type any class</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;298</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return true if this class is a collection (e.g. {@link Collection}, {@link HashSet}, {@link Vector})</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;299</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;300</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">boolean</span> isClassCollection(Class&lt;?&gt; type) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;301</td>
  <td class="nbHitsCovered">&nbsp;731</td>
  <td class="src"><pre class="src">&nbsp;        checkNull(type);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;302</td>
  <td class="nbHitsCovered">&nbsp;731</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">boolean</span> collection = <span class="keyword">false</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;303</td>
  <td class="nbHitsCovered">&nbsp;731</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (Collection.<span class="keyword">class</span>.isAssignableFrom(type)) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;304</td>
  <td class="nbHitsCovered">&nbsp;55</td>
  <td class="src"><pre class="src">&nbsp;            collection = <span class="keyword">true</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;305</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;306</td>
  <td class="nbHitsCovered">&nbsp;731</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> collection;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;307</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;308</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;309</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;310</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param type any class</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;311</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return true if this class is a map (e.g. {@link Map}, {@link HashMap})</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;312</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;313</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">boolean</span> isClassMap(Class&lt;?&gt; type) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;314</td>
  <td class="nbHitsCovered">&nbsp;395</td>
  <td class="src"><pre class="src">&nbsp;        checkNull(type);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;315</td>
  <td class="nbHitsCovered">&nbsp;395</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">boolean</span> collection = <span class="keyword">false</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;316</td>
  <td class="nbHitsCovered">&nbsp;395</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (Map.<span class="keyword">class</span>.isAssignableFrom(type)) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;317</td>
  <td class="nbHitsCovered">&nbsp;118</td>
  <td class="src"><pre class="src">&nbsp;            collection = <span class="keyword">true</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;318</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;319</td>
  <td class="nbHitsCovered">&nbsp;395</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> collection;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;320</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;321</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;322</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;323</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param type any class</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;324</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return true if this is a collection, map, or array, </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;325</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * something that holds a bunch of objects (e.g. {@link Map}, {@link Set}, {@link List}, array)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;326</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;327</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">boolean</span> isClassObjectHolder(Class&lt;?&gt; type) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;328</td>
  <td class="nbHitsCovered">&nbsp;298</td>
  <td class="src"><pre class="src">&nbsp;        checkNull(type);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;329</td>
  <td class="nbHitsCovered">&nbsp;298</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">boolean</span> holder = <span class="keyword">false</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;330</td>
  <td class="nbHitsCovered">&nbsp;298</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> ( isClassArray(type) || isClassCollection(type) || isClassMap(type) ) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;331</td>
  <td class="nbHitsCovered">&nbsp;58</td>
  <td class="src"><pre class="src">&nbsp;            holder = <span class="keyword">true</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;332</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;333</td>
  <td class="nbHitsCovered">&nbsp;298</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> holder;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;334</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;335</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;336</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;337</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param type any class</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;338</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the type of the array elements if this is an array or just the type if it is not an array</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;339</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;340</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> Class&lt;?&gt; getTypeFromArray(Class&lt;?&gt; type) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;341</td>
  <td class="nbHitsCovered">&nbsp;9</td>
  <td class="src"><pre class="src">&nbsp;        Class&lt;?&gt; toType = type;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;342</td>
  <td class="nbHitsCovered">&nbsp;9</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (type.isArray()) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;343</td>
  <td class="nbHitsCovered">&nbsp;8</td>
  <td class="src"><pre class="src">&nbsp;            toType = type.getComponentType();</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;344</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;345</td>
  <td class="nbHitsCovered">&nbsp;9</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> toType;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;346</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;347</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;348</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;349</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Checks for the special cases of the inner collections in {@link Collections} and {@link Arrays}</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;350</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param type any class type</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;351</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the equivalent of the inner collection type or the original type if this is not one</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;352</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;353</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> Class&lt;?&gt; getTypeFromInnerCollection(Class&lt;?&gt; type) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;354</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// check for the special cases of collections which cannot be constructed</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;355</td>
  <td class="nbHitsCovered">&nbsp;113</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (type != <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;356</td>
  <td class="nbHitsCovered">&nbsp;113</td>
  <td class="src"><pre class="src">&nbsp;            Class&lt;?&gt; parent = type.getEnclosingClass();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;357</td>
  <td class="nbHitsCovered">&nbsp;113</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">if</span> (parent != <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;358</td>
  <td class="nbHitsCovered">&nbsp;10</td>
  <td class="src"><pre class="src">&nbsp;                <span class="keyword">if</span> (Collections.<span class="keyword">class</span>.equals(parent)) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;359</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="comment">// unmodifiable collections</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;360</td>
  <td class="nbHitsCovered">&nbsp;6</td>
  <td class="src"><pre class="src">&nbsp;                    List&lt;Class&lt;?&gt;&gt; l = getInterfacesForClass(type);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;361</td>
  <td class="nbHitsCovered">&nbsp;6</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="keyword">if</span> (l.size() &gt; 0) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;362</td>
  <td class="nbHitsCovered">&nbsp;6</td>
  <td class="src"><pre class="src">&nbsp;                        <span class="keyword">for</span> (Class&lt;?&gt; iface : l) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;363</td>
  <td class="nbHitsCovered">&nbsp;7</td>
  <td class="src"><pre class="src">&nbsp;                            <span class="keyword">if</span> (Collection.<span class="keyword">class</span>.isAssignableFrom(iface)) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;364</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;                                <span class="keyword">if</span> ( List.<span class="keyword">class</span>.isAssignableFrom(iface) </pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;365</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                                        || Set.<span class="keyword">class</span>.isAssignableFrom(iface)) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;366</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;                                    type = iface;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;367</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                                } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;368</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;                                    type = Collection.<span class="keyword">class</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;369</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                                }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;370</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;                                <span class="keyword">break</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;371</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;                            } <span class="keyword">else</span> <span class="keyword">if</span> (Map.<span class="keyword">class</span>.isAssignableFrom(iface)) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;372</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;                                type = iface;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;373</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;                                <span class="keyword">break</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;374</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                            }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;375</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;376</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;377</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                        type = Collection.<span class="keyword">class</span>;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;378</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;379</td>
  <td class="nbHitsCovered">&nbsp;6</td>
  <td class="src"><pre class="src">&nbsp;                } <span class="keyword">else</span> <span class="keyword">if</span> (Arrays.<span class="keyword">class</span>.equals(parent)) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;380</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="comment">// Arrays#ArrayList special case</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;381</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;                    type = List.<span class="keyword">class</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;382</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;383</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;384</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;385</td>
  <td class="nbHitsCovered">&nbsp;113</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> type;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;386</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;387</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;388</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;389</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Gets a valid class which can be constructed from an interface or special cases which cannot be constructed</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;390</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param &lt;T&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;391</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param type any class</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;392</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the type which implements this interface if one can be found</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;393</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;394</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    @SuppressWarnings(<span class="string">"unchecked"</span>)</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;395</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> &lt;T&gt; Class&lt;T&gt; getClassFromInterface(Class&lt;T&gt; type) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;396</td>
  <td class="nbHitsCovered">&nbsp;113</td>
  <td class="src"><pre class="src">&nbsp;        Class&lt;T&gt; toType = type;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;397</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// check for the special cases of collections which cannot be constructed</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;398</td>
  <td class="nbHitsCovered">&nbsp;113</td>
  <td class="src"><pre class="src">&nbsp;        type = (Class&lt;T&gt;) ConstructorUtils.getTypeFromInnerCollection(type);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;399</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// now check for interfaces</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;400</td>
  <td class="nbHitsCovered">&nbsp;113</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (type.isInterface()) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;401</td>
  <td class="nbHitsCovered">&nbsp;28</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">if</span> (SortedSet.<span class="keyword">class</span>.isAssignableFrom(type)) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;402</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;                toType = (Class&lt;T&gt;) TreeSet.<span class="keyword">class</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;403</td>
  <td class="nbHitsCovered">&nbsp;27</td>
  <td class="src"><pre class="src">&nbsp;            } <span class="keyword">else</span> <span class="keyword">if</span> (SortedMap.<span class="keyword">class</span>.isAssignableFrom(type)) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;404</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;                toType = (Class&lt;T&gt;) TreeMap.<span class="keyword">class</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;405</td>
  <td class="nbHitsCovered">&nbsp;26</td>
  <td class="src"><pre class="src">&nbsp;            } <span class="keyword">else</span> <span class="keyword">if</span> ( isClassList(type) ) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;406</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="comment">// we use the thread safe version of list by default</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;407</td>
  <td class="nbHitsCovered">&nbsp;11</td>
  <td class="src"><pre class="src">&nbsp;                toType = (Class&lt;T&gt;) Vector.<span class="keyword">class</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;408</td>
  <td class="nbHitsCovered">&nbsp;15</td>
  <td class="src"><pre class="src">&nbsp;            } <span class="keyword">else</span> <span class="keyword">if</span> (Set.<span class="keyword">class</span>.isAssignableFrom(type)) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;409</td>
  <td class="nbHitsCovered">&nbsp;7</td>
  <td class="src"><pre class="src">&nbsp;                toType = (Class&lt;T&gt;) HashSet.<span class="keyword">class</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;410</td>
  <td class="nbHitsCovered">&nbsp;8</td>
  <td class="src"><pre class="src">&nbsp;            } <span class="keyword">else</span> <span class="keyword">if</span> ( isClassMap(type) ) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;411</td>
  <td class="nbHitsCovered">&nbsp;6</td>
  <td class="src"><pre class="src">&nbsp;                toType = (Class&lt;T&gt;) ArrayOrderedMap.<span class="keyword">class</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;412</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;            } <span class="keyword">else</span> <span class="keyword">if</span> ( isClassCollection(type) ) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;413</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;                toType = (Class&lt;T&gt;) Vector.<span class="keyword">class</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;414</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// Serializable should stay at the end</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;415</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            } <span class="keyword">else</span> <span class="keyword">if</span> (Serializable.<span class="keyword">class</span>.isAssignableFrom(type)) {</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;416</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="comment">// if it is serializable then it is probably a string right?</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;417</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                toType = (Class&lt;T&gt;) String.<span class="keyword">class</span>;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;418</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;419</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="comment">// TODO try to find the interface implementation in the ClassLoader (not actually possible without real hackery)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;420</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;421</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;422</td>
  <td class="nbHitsCovered">&nbsp;113</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> toType;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;423</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;424</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;425</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;426</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * A simple but efficient method for getting the interfaces for a class type,</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;427</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * this has some shortcuts for the common types like maps, lists, etc.&lt;br/&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;428</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Only returns the interfaces for the current type and not for all nested types</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;429</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;430</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param type any class type</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;431</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the list of interfaces (empty if none)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;432</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;433</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> List&lt;Class&lt;?&gt;&gt; getInterfacesForClass(Class&lt;?&gt; type) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;434</td>
  <td class="nbHitsCovered">&nbsp;15</td>
  <td class="src"><pre class="src">&nbsp;        ArrayList&lt;Class&lt;?&gt;&gt; interfaces = <span class="keyword">new</span> ArrayList&lt;Class&lt;?&gt;&gt;();</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;435</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// find the actual interfaces from the class itself</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;436</td>
  <td class="nbHitsCovered">&nbsp;46</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">for</span> (Class&lt;?&gt; iface : type.getInterfaces()) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;437</td>
  <td class="nbHitsCovered">&nbsp;31</td>
  <td class="src"><pre class="src">&nbsp;            interfaces.add(iface);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;438</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;439</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// add in the collection interface if this is a collection</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;440</td>
  <td class="nbHitsCovered">&nbsp;15</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> ( isClassCollection(type) ) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;441</td>
  <td class="nbHitsCovered">&nbsp;9</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">if</span> ( isClassList(type) ) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;442</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;                interfaces.add(List.<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;443</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;            } <span class="keyword">else</span> <span class="keyword">if</span> ( Set.<span class="keyword">class</span>.isAssignableFrom(type)) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;444</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;                interfaces.add(Set.<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;445</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;446</td>
  <td class="nbHitsCovered">&nbsp;9</td>
  <td class="src"><pre class="src">&nbsp;            interfaces.add(Collection.<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;447</td>
  <td class="nbHitsCovered">&nbsp;6</td>
  <td class="src"><pre class="src">&nbsp;        } <span class="keyword">else</span> <span class="keyword">if</span> ( isClassMap(type) ) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;448</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;            interfaces.add(Map.<span class="keyword">class</span>);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;449</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;450</td>
  <td class="nbHitsCovered">&nbsp;15</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> interfaces;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;451</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;452</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;453</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;454</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Adds the class which this class extends (if there is one) to the list of interfaces</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;455</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see #getInterfacesForClass(Class)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;456</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param type any class type</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;457</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the list of interfaces and the class this extends (empty if none)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;458</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;459</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> List&lt;Class&lt;?&gt;&gt; getExtendAndInterfacesForClass(Class&lt;?&gt; type) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;460</td>
  <td class="nbHitsCovered">&nbsp;9</td>
  <td class="src"><pre class="src">&nbsp;        ArrayList&lt;Class&lt;?&gt;&gt; l = <span class="keyword">new</span> ArrayList&lt;Class&lt;?&gt;&gt;();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;461</td>
  <td class="nbHitsCovered">&nbsp;9</td>
  <td class="src"><pre class="src">&nbsp;        Class&lt;?&gt; superClass = type.getSuperclass();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;462</td>
  <td class="nbHitsCovered">&nbsp;9</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (superClass != <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;463</td>
  <td class="nbHitsCovered">&nbsp;9</td>
  <td class="src"><pre class="src">&nbsp;            l.add(superClass);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;464</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;465</td>
  <td class="nbHitsCovered">&nbsp;9</td>
  <td class="src"><pre class="src">&nbsp;        l.addAll( getInterfacesForClass(type) );</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;466</td>
  <td class="nbHitsCovered">&nbsp;9</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> l;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;467</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;468</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;469</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;470</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Get the wrapper class for this class if there is one</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;471</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param beanClass any class</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;472</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the wrapper class if there is one OR just returns the given class</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;473</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;474</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> Class&lt;?&gt; getWrapper(<span class="keyword">final</span> Class&lt;?&gt; beanClass) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;475</td>
  <td class="nbHitsCovered">&nbsp;1674</td>
  <td class="src"><pre class="src">&nbsp;        Class&lt;?&gt; wrapper = <span class="keyword">null</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;476</td>
  <td class="nbHitsCovered">&nbsp;1674</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (beanClass != <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;477</td>
  <td class="nbHitsCovered">&nbsp;1673</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">if</span> ( isClassPrimitive(beanClass) ) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;478</td>
  <td class="nbHitsCovered">&nbsp;115</td>
  <td class="src"><pre class="src">&nbsp;                wrapper = getPrimitiveToWrapper().get(beanClass);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;479</td>
  <td class="nbHitsCovered">&nbsp;1558</td>
  <td class="src"><pre class="src">&nbsp;            } <span class="keyword">else</span> <span class="keyword">if</span> ( isClassArray(beanClass) &amp;&amp; beanClass.getComponentType().isPrimitive()) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;480</td>
  <td class="nbHitsCovered">&nbsp;16</td>
  <td class="src"><pre class="src">&nbsp;                wrapper = getPrimitiveToWrapper().get(beanClass);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;481</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;482</td>
  <td class="nbHitsCovered">&nbsp;1542</td>
  <td class="src"><pre class="src">&nbsp;                wrapper = beanClass;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;483</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;484</td>
  <td class="nbHitsCovered">&nbsp;1673</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">if</span> (wrapper == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;485</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                wrapper = beanClass;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;486</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;487</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;488</td>
  <td class="nbHitsCovered">&nbsp;1674</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> wrapper;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;489</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;490</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;491</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;492</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Will compare 2 classes for equality which will make a friendly comparison of types</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;493</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * and will happily compare primitive types with wrappers and say they are equal</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;494</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param c1 any class</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;495</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param c2 any class</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;496</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return true if the classes are equivalent, false otherwise</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;497</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;498</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">boolean</span> classEquals(<span class="keyword">final</span> Class&lt;?&gt; c1, <span class="keyword">final</span> Class&lt;?&gt; c2) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;499</td>
  <td class="nbHitsCovered">&nbsp;284</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">boolean</span> equals = <span class="keyword">false</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;500</td>
  <td class="nbHitsCovered">&nbsp;284</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (c1 == <span class="keyword">null</span> || c2 == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;501</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;            equals = <span class="keyword">false</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;502</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;503</td>
  <td class="nbHitsCovered">&nbsp;282</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">if</span> (c1.isArray() &amp;&amp; c2.isArray()) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;504</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="comment">// both arrays</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;505</td>
  <td class="nbHitsCovered">&nbsp;26</td>
  <td class="src"><pre class="src">&nbsp;                <span class="keyword">if</span> (c1.getComponentType().isPrimitive() == c2.getComponentType().isPrimitive()) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;506</td>
  <td class="nbHitsCovered">&nbsp;24</td>
  <td class="src"><pre class="src">&nbsp;                    equals = c1.equals(c2);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;507</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;508</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="comment">// mixed primitive/wrappers so make all wrappers</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;509</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;                    Class&lt;?&gt; c1W = getWrapper(c1);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;510</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;                    Class&lt;?&gt; c2W = getWrapper(c2);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;511</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;                    equals = c1W.equals(c2W);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;512</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;                }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;513</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;514</td>
  <td class="nbHitsCovered">&nbsp;256</td>
  <td class="src"><pre class="src">&nbsp;                <span class="keyword">if</span> (c1.isArray() || c2.isArray()) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;515</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="comment">// one array and the other is not so cannot be equals</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;516</td>
  <td class="nbHitsCovered">&nbsp;30</td>
  <td class="src"><pre class="src">&nbsp;                    equals = <span class="keyword">false</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;517</td>
  <td class="nbHitsCovered">&nbsp;226</td>
  <td class="src"><pre class="src">&nbsp;                } <span class="keyword">else</span> <span class="keyword">if</span> (c1.isPrimitive() == c2.isPrimitive()) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;518</td>
  <td class="nbHitsCovered">&nbsp;184</td>
  <td class="src"><pre class="src">&nbsp;                    equals = c1.equals(c2);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;519</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;520</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="comment">// mixed primitive/wrappers so make all wrappers</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;521</td>
  <td class="nbHitsCovered">&nbsp;42</td>
  <td class="src"><pre class="src">&nbsp;                    Class&lt;?&gt; c1W = getWrapper(c1);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;522</td>
  <td class="nbHitsCovered">&nbsp;42</td>
  <td class="src"><pre class="src">&nbsp;                    Class&lt;?&gt; c2W = getWrapper(c2);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;523</td>
  <td class="nbHitsCovered">&nbsp;42</td>
  <td class="src"><pre class="src">&nbsp;                    equals = c1W.equals(c2W);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;524</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;525</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;526</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;527</td>
  <td class="nbHitsCovered">&nbsp;284</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> equals;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;528</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;529</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;530</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;531</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Checks if assignFrom is assignable to assignTo (i.e. this is OK: assignFrom b; assignTo a = (assignTo) b;) &lt;br/&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;532</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * An example of this is: Integer b; Object a = (Object) b; &lt;br/&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;533</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Another example of this is: ExtendedThing b; Thing a = (Thing) b; &lt;br/&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;534</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * This works like {@link #classEquals(Class, Class)} and will convert primitive class types for comparison automatically</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;535</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;536</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param assignFrom any class</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;537</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param assignTo any class</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;538</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return true if the class is assignable or equal OR false otherwise</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;539</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;540</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">boolean</span> classAssignable(<span class="keyword">final</span> Class&lt;?&gt; assignFrom, <span class="keyword">final</span> Class&lt;?&gt; assignTo) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;541</td>
  <td class="nbHitsCovered">&nbsp;300</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">boolean</span> assignable = <span class="keyword">false</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;542</td>
  <td class="nbHitsCovered">&nbsp;300</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (assignTo == <span class="keyword">null</span> || assignFrom == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;543</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;            assignable = <span class="keyword">false</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;544</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;545</td>
  <td class="nbHitsCovered">&nbsp;298</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">if</span> ( Object.<span class="keyword">class</span>.equals(assignTo) ) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;546</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="comment">// anything can assign to an object</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;547</td>
  <td class="nbHitsCovered">&nbsp;39</td>
  <td class="src"><pre class="src">&nbsp;                assignable = <span class="keyword">true</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;548</td>
  <td class="nbHitsCovered">&nbsp;259</td>
  <td class="src"><pre class="src">&nbsp;            } <span class="keyword">else</span> <span class="keyword">if</span> ( classEquals(assignTo, assignFrom) ) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;549</td>
  <td class="nbHitsCovered">&nbsp;143</td>
  <td class="src"><pre class="src">&nbsp;                assignable = <span class="keyword">true</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;550</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;551</td>
  <td class="nbHitsCovered">&nbsp;116</td>
  <td class="src"><pre class="src">&nbsp;                <span class="keyword">if</span> (assignTo.isAssignableFrom(assignFrom)) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;552</td>
  <td class="nbHitsCovered">&nbsp;11</td>
  <td class="src"><pre class="src">&nbsp;                    assignable = <span class="keyword">true</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;553</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;554</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="comment">// make everything wrappers</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;555</td>
  <td class="nbHitsCovered">&nbsp;105</td>
  <td class="src"><pre class="src">&nbsp;                    Class&lt;?&gt; c1W = getWrapper(assignTo);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;556</td>
  <td class="nbHitsCovered">&nbsp;105</td>
  <td class="src"><pre class="src">&nbsp;                    Class&lt;?&gt; c2W = getWrapper(assignFrom);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;557</td>
  <td class="nbHitsCovered">&nbsp;105</td>
  <td class="src"><pre class="src">&nbsp;                    assignable = c1W.isAssignableFrom(c2W);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;558</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;559</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;560</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;561</td>
  <td class="nbHitsCovered">&nbsp;300</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> assignable;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;562</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;563</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;564</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/* </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;565</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Some code below derived from BeanUtilsBean and PropertyUtilsbean</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;566</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * http://commons.apache.org/beanutils/</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;567</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   Licensed under the Apache License, Version 2.0 (the "License");</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;568</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;569</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;570</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;571</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Construct an object for the class of the given type regardless of whether it has a default constructor,</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;572</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * this will construct anything which has a valid class type including primitives,</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;573</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * arrays, collections and even classes without default constructors,</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;574</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * this will attempt to use the default constructor first if available though, </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;575</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * It must be possible to construct the class without knowing something about it beforehand,</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;576</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * (i.e. classes with only constructors which require non-null arguments will not be able</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;577</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * to be constructed)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;578</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;579</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param &lt;T&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;580</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param type any object class</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;581</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the newly constructed object of the given class type </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;582</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * (if primitive then a wrapped object will be returned which java will unwrap automatically)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;583</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if the class is null or the class cannot be constructed</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;584</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;585</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    @SuppressWarnings(<span class="string">"unchecked"</span>)</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;586</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> &lt;T&gt; T constructClass(Class&lt;T&gt; type) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;587</td>
  <td class="nbHitsCovered">&nbsp;87</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (type == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;588</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"Cannot construct class when beanClass is null"</span>);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;589</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;590</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// make sure we are not trying to construct an interface</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;591</td>
  <td class="nbHitsCovered">&nbsp;85</td>
  <td class="src"><pre class="src">&nbsp;        type = ConstructorUtils.getClassFromInterface(type);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;592</td>
  <td class="nbHitsCovered">&nbsp;85</td>
  <td class="src"><pre class="src">&nbsp;        T newC = <span class="keyword">null</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;593</td>
  <td class="nbHitsCovered">&nbsp;85</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> ( isClassPrimitive(type) ) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;594</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">if</span> (getPrimitiveDefaults().containsKey(type)) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;595</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;                newC = (T) getPrimitiveDefaults().get(type);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;596</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;597</td>
  <td class="nbHitsCovered">&nbsp;81</td>
  <td class="src"><pre class="src">&nbsp;        } <span class="keyword">else</span> <span class="keyword">if</span> ( isClassArray(type) ) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;598</td>
  <td class="nbHitsCovered">&nbsp;6</td>
  <td class="src"><pre class="src">&nbsp;            Class&lt;?&gt; componentType = getTypeFromArray(type);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;599</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">try</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;600</td>
  <td class="nbHitsCovered">&nbsp;6</td>
  <td class="src"><pre class="src">&nbsp;                newC = (T) Array.newInstance(componentType, 0);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;601</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            } <span class="keyword">catch</span> (RuntimeException e) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;602</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"Could not construct array of type: "</span> + componentType + <span class="string">" for: "</span> + type.getName());</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;603</td>
  <td class="nbHitsCovered">&nbsp;6</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;604</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;605</td>
  <td class="nbHitsCovered">&nbsp;85</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (newC == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;606</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">try</span> {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;607</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="comment">// this should work 99% of the time</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;608</td>
  <td class="nbHitsCovered">&nbsp;75</td>
  <td class="src"><pre class="src">&nbsp;                newC = (T) type.newInstance();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;609</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;            } <span class="keyword">catch</span> (InstantiationException e) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;610</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="comment">// now we will try to use the various constructors by giving them null values to construct the object</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;611</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;                List&lt;Constructor&lt;T&gt;&gt; constructors = <span class="keyword">null</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;612</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;                <span class="keyword">if</span> ( ConstructorUtils.isClassBean(type) ) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;613</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="comment">// get bean constructors</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;614</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;                    constructors = getClassDataCacher().getClassData(type).getConstructors();</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;615</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;616</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="comment">// simpler type</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;617</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="keyword">try</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;618</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;                        Constructor&lt;T&gt;[] c = type.getConstructors();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;619</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;                        constructors = Arrays.asList(c);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;620</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    } <span class="keyword">catch</span> (SecurityException e1) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;621</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                        <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"Could not construct object for class ("</span> + type.getName() + <span class="string">"): "</span> + e1.getMessage(), e1);</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;622</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;                    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;623</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;624</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;                <span class="keyword">for</span> (Constructor&lt;T&gt; constructor : constructors) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;625</td>
  <td class="nbHitsCovered">&nbsp;6</td>
  <td class="src"><pre class="src">&nbsp;                    Object[] params = <span class="keyword">new</span> Object[ constructor.getParameterTypes().length ];</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;626</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="keyword">try</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;627</td>
  <td class="nbHitsCovered">&nbsp;6</td>
  <td class="src"><pre class="src">&nbsp;                        newC = (T) constructor.newInstance(params);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;628</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;                        <span class="keyword">break</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;629</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;                    } <span class="keyword">catch</span> (IllegalArgumentException e1) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;630</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        <span class="comment">// oh well</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;631</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    } <span class="keyword">catch</span> (InstantiationException e1) {</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;632</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        <span class="comment">// tough cookies</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;633</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    } <span class="keyword">catch</span> (IllegalAccessException e1) {</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;634</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        <span class="comment">// them's the breaks</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;635</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    } <span class="keyword">catch</span> (InvocationTargetException e1) {</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;636</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        <span class="comment">// life's tough</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;637</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    } <span class="keyword">catch</span> (ExceptionInInitializerError e1) {</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;638</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        <span class="comment">// meh</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;639</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;                    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;640</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="comment">// ignore any exceptions and keep trying</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;641</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;                }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;642</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;                <span class="keyword">if</span> (newC == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;643</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="comment">// all attempts failed</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;644</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"Could not construct object for class ("</span> + type.getName() + <span class="string">") using newInstance or using any of the constructors"</span>, e);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;645</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;646</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            } <span class="keyword">catch</span> (IllegalAccessException e) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;647</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"Could not construct object for class ("</span> + type.getName() + <span class="string">"): "</span> + e.getMessage(), e);</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;648</td>
  <td class="nbHitsCovered">&nbsp;75</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;649</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;650</td>
  <td class="nbHitsCovered">&nbsp;85</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> newC;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;651</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;652</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;653</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;654</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Construct an object for the class of the given type with the given params (arguments),</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;655</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * arguments must match or the construction will fail</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;656</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * </span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;657</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param &lt;T&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;658</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param type any object class</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;659</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param params the parameters (args) for the constructor</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;660</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the newly constructed object of the given class type OR fails if the params cannot be matched</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;661</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IllegalArgumentException if the class is null or the class cannot be constructed</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;662</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;663</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    @SuppressWarnings(<span class="string">"unchecked"</span>)</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;664</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> &lt;T&gt; T constructClass(Class&lt;T&gt; type, Object[] params) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;665</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (type == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;666</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"beanClass cannot be null"</span>);</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;667</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;668</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;        T newC = <span class="keyword">null</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;669</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (params == <span class="keyword">null</span> || params.length == 0) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;670</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;            newC = constructClass(type);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;671</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;672</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">int</span> paramsCount = params.length;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;673</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// get all the constructors</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;674</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;            List&lt;Constructor&lt;T&gt;&gt; constructors = <span class="keyword">null</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;675</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">try</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;676</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;                constructors = getClassDataCacher().getClassData(type).getConstructors();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;677</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            } <span class="keyword">catch</span> (IllegalArgumentException e) {</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;678</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="keyword">try</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;679</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    Constructor&lt;T&gt;[] c = type.getConstructors();</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;680</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    constructors = Arrays.asList(c);</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;681</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                } <span class="keyword">catch</span> (SecurityException e1) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;682</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"Could not construct object for class ("</span> + type.getName() + <span class="string">")"</span>, e1);</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;683</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                }</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;684</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;685</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// make a list of the param type arrays</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;686</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;            List&lt;Class&lt;?&gt;[]&gt; constParamTypesList = <span class="keyword">new</span> ArrayList&lt;Class&lt;?&gt;[]&gt;();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;687</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">for</span> (Constructor&lt;T&gt; constructor : constructors) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;688</td>
  <td class="nbHitsCovered">&nbsp;9</td>
  <td class="src"><pre class="src">&nbsp;                constParamTypesList.add( constructor.getParameterTypes() );</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;689</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;690</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// make an array of the input params types</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;691</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;            Class&lt;?&gt;[] paramTypes = <span class="keyword">new</span> Class&lt;?&gt;[params.length];</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;692</td>
  <td class="nbHitsCovered">&nbsp;8</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">for</span> (<span class="keyword">int</span> i = 0; i &lt; params.length; i++) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;693</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;                <span class="keyword">if</span> (params[i] == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;694</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="comment">// handle nulls as any object</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;695</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    paramTypes[i] = Object.<span class="keyword">class</span>;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;696</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;697</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;                    Class&lt;?&gt; c = params[i].getClass();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;698</td>
  <td class="nbHitsCovered">&nbsp;5</td>
  <td class="src"><pre class="src">&nbsp;                    paramTypes[i] = c;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;699</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;700</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;701</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// now see if any are a match</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;702</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;            Constructor&lt;T&gt; matched = <span class="keyword">null</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;703</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;            Object[] args = <span class="keyword">null</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;704</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// try to find exact match by size and order </span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;705</td>
  <td class="nbHitsCovered">&nbsp;9</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">for</span> (<span class="keyword">int</span> i = 0; i &lt; constParamTypesList.size(); i++) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;706</td>
  <td class="nbHitsCovered">&nbsp;8</td>
  <td class="src"><pre class="src">&nbsp;                Class&lt;?&gt;[] cParamTypes = constParamTypesList.get(i);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;707</td>
  <td class="nbHitsCovered">&nbsp;8</td>
  <td class="src"><pre class="src">&nbsp;                <span class="keyword">if</span> (cParamTypes.length == paramsCount) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;708</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="comment">// found matching number of params</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;709</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="keyword">boolean</span> matching = <span class="keyword">false</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;710</td>
  <td class="nbHitsCovered">&nbsp;6</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="keyword">for</span> (<span class="keyword">int</span> j = 0; j &lt; cParamTypes.length; j++) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;711</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;                        <span class="keyword">if</span> ( classEquals(paramTypes[j], cParamTypes[j]) ) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;712</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;                            matching = <span class="keyword">true</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;713</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;714</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;                            matching = <span class="keyword">false</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;715</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;                            <span class="keyword">break</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;716</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;717</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;718</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="keyword">if</span> (matching) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;719</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        <span class="comment">// found exact match</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;720</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;                        matched = constructors.get(i);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;721</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;                        args = params;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;722</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;                        <span class="keyword">break</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;723</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;724</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;725</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;726</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// try to find exact match by size and order (but not the exact class types, just assignable) </span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;727</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">if</span> (matched == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;728</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;                <span class="keyword">for</span> (<span class="keyword">int</span> i = 0; i &lt; constParamTypesList.size(); i++) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;729</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;                    Class&lt;?&gt;[] cParamTypes = constParamTypesList.get(i);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;730</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="keyword">if</span> (cParamTypes.length == paramsCount) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;731</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        <span class="comment">// found matching number of params</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;732</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;                        <span class="keyword">boolean</span> matching = <span class="keyword">false</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;733</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;                        <span class="keyword">for</span> (<span class="keyword">int</span> j = 0; j &lt; cParamTypes.length; j++) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;734</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;                            <span class="keyword">if</span> ( classAssignable(cParamTypes[j], paramTypes[j]) ) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;735</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                                <span class="comment">// assignable (near) match</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;736</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                                matching = <span class="keyword">true</span>;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;737</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                            } <span class="keyword">else</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;738</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;                                matching = <span class="keyword">false</span>;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;739</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;                                <span class="keyword">break</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;740</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                            }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;741</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;742</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;                        <span class="keyword">if</span> (matching) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;743</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                            <span class="comment">// found nearly exact match</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;744</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                            matched = constructors.get(i);</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;745</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                            args = params;</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;746</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                            <span class="keyword">break</span>;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;747</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;748</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;749</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;750</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;751</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// TODO try to find near match by size (same number and types)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;752</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// TODO try to find near match by order (same order but with extra junk nulls on the end)</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;753</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// TODO try to make any possible match</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;754</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// now try to construct if we got a match</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;755</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">if</span> (matched != <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;756</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="keyword">try</span> {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;757</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;                    newC = matched.newInstance(args);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;758</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                } <span class="keyword">catch</span> (Exception e) {</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;759</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"Failure constructing object for class ("</span> + type.getName() + <span class="string">") with the given params: "</span> + ArrayUtils.arrayToString(params), e);</span></pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;760</td>
  <td class="nbHitsCovered">&nbsp;2</td>
  <td class="src"><pre class="src">&nbsp;                }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;761</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;762</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;763</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (newC == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;764</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"Could not construct object for class ("</span> + type.getName() + <span class="string">") with the given params: "</span> + ArrayUtils.arrayToString(params));</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;765</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;766</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> newC;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;767</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;768</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;769</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    @Override</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;770</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> String toString() {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;771</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> <span class="string">"Construct:"</span>+getClassDataCacher();</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;772</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;773</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;774</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">// STATIC access</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;775</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;776</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">protected</span> <span class="keyword">static</span> SoftReference&lt;ConstructorUtils&gt; instanceStorage;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;777</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;778</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Get a singleton instance of this class to work with (stored statically) &lt;br/&gt;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;779</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;b&gt;WARNING&lt;/b&gt;: do not hold onto this object or cache it yourself, call this method again if you need it again</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;780</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return a singleton instance of this class</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;781</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;782</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> ConstructorUtils getInstance() {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;783</td>
  <td class="nbHitsCovered">&nbsp;69</td>
  <td class="src"><pre class="src">&nbsp;        ConstructorUtils instance = (instanceStorage == <span class="keyword">null</span> ? <span class="keyword">null</span> : instanceStorage.get());</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;784</td>
  <td class="nbHitsCovered">&nbsp;69</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (instance == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;785</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;            instance = ConstructorUtils.setInstance(<span class="keyword">null</span>);</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;786</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;787</td>
  <td class="nbHitsCovered">&nbsp;69</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> instance;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;788</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;789</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;790</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Set the singleton instance of the class which will be stored statically</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;791</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param instance the instance to use as the singleton instance</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;792</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;793</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> ConstructorUtils setInstance(ConstructorUtils newInstance) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;794</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;        ConstructorUtils instance = newInstance;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;795</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">if</span> (instance == <span class="keyword">null</span>) {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;796</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;            instance = <span class="keyword">new</span> ConstructorUtils();</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;797</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;            instance.singleton = <span class="keyword">true</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;798</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;799</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;        ConstructorUtils.timesCreated++;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;800</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;        instanceStorage = <span class="keyword">new</span> SoftReference&lt;ConstructorUtils&gt;(instance);</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;801</td>
  <td class="nbHitsCovered">&nbsp;4</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> instance;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;802</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;803</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;804</td>
  <td class="nbHitsCovered">&nbsp;1</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">int</span> timesCreated = 0;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;805</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">int</span> getTimesCreated() {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;806</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> timesCreated;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;807</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;808</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;809</td>
  <td class="nbHitsCovered">&nbsp;3</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">boolean</span> singleton = <span class="keyword">false</span>;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;810</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;811</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return true if this object is the singleton</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;812</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;813</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">boolean</span> isSingleton() {</pre></td>
</tr>
<tr>
  <td class="numLineCover">&nbsp;814</td>
  <td class="nbHitsUncovered">&nbsp;0</td>
  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> singleton;</span></pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;815</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;816</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td>
</tr>
<tr>
  <td class="numLine">&nbsp;817</td>
  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;}</pre></td>
</tr>
</table>
<div class="footer">
Reports generated by <a href="http://cobertura.sourceforge.net/" target="_top">Cobertura</a>.
</div>
</body>
</html>
